package com.yf.tz.vo.down;


import lombok.Data;
import java.util.Date;
import com.alibaba.excel.annotation.*;
import java.io.Serializable;


import java.math.BigDecimal;

import com.yf.tz.entity.ServerConfigEntity;
import com.yf.tz.vo.ServerConfigVo;

                                        import com.yf.tz.enums.ServerConfigStatusEnum;

/**
 * 实体
 * 表名 server_config
 *
 * @author hxf
 * @email 505860922@qq.com
 * @date Mon Aug 10 10:29:20 CST 2020
 */
@Data
public class ServerConfigDown implements Serializable {
    @ExcelIgnore
    private static final long serialVersionUID = 1L;

                        //
            @ExcelProperty("")
            private Long id;
        
                        //名称
            @ExcelProperty("名称")
            private String name;
        
                        //IMG-logo
            @ExcelProperty("IMG-logo")
            private String logo;
        
                        //标语
            @ExcelProperty("标语")
            private String slogan;
        
                        //邮费
            @ExcelProperty("邮费")
            private BigDecimal mailFee;
        
                        //包邮价格
            @ExcelProperty("包邮价格")
            private BigDecimal mailFree;
        
                        //起送价格
            @ExcelProperty("起送价格")
            private BigDecimal sendStart;
        
                        //配送费
            @ExcelProperty("配送费")
            private BigDecimal sendFee;
        
                        //管理员编号
            @ExcelProperty("管理员编号")
            private String adminCode;
        
                        //ENUM-状态:"BAN-禁用","OPEN-打开"
            @ExcelIgnore
            private Integer status;
                        @ExcelProperty("状态")
            private String statusStr;
        
    
    public ServerConfigDown() {

    }

    public ServerConfigDown(ServerConfigVo vo) {
        ServerConfigEntity entity = vo.getEntity();
                                    this.setId(entity.getId());
            
                                    this.setName(entity.getName());
            
                                    this.setLogo(entity.getLogo());
            
                                    this.setSlogan(entity.getSlogan());
            
                                    this.setMailFee(entity.getMailFee());
            
                                    this.setMailFree(entity.getMailFree());
            
                                    this.setSendStart(entity.getSendStart());
            
                                    this.setSendFee(entity.getSendFee());
            
                                    this.setAdminCode(entity.getAdminCode());
            
                                    this.setStatus(entity.getStatus());
                if(entity.getStatus()!=null){
                    this.setStatusStr( ServerConfigStatusEnum.indexOf(entity.getStatus()));
                }
            
            }


}
